/*
 * A Bullet Library Demo, by Andrew Dyer
 */

#ifdef WIN32
  #define GLEW_STATIC
  #include "GL\glew.h"

  #define FREEGLUT_STATIC
  #define FREEGLUT_LIB_PRAGMAS 0
  #include "GL\glut.h"
#else
  #include "GLUT\glut.h"
#endif

#include <stdio.h>
#include <math.h>

#include "include\vector.h"
#include "include\matrix.h"
#include "include\shader.h"
#include "include\btBulletDynamicsCommon.h"

#include "DemoEntity.h"
#include "BulletDemo.h"

int main(int argc, char **argv)
{
  glutInit(&argc, argv);
  glutInitDisplayMode(GLUT_RGBA|GLUT_DEPTH|GLUT_DOUBLE);
  glutInitWindowSize(700, 700);
  glutCreateWindow("Bullet Demo - Andrew Dyer");
  #ifdef WIN32
    glewInit();
    if (!glewIsSupported("GL_VERSION_2_0") )
    {
      printf("OpenGL 2 is required!\n");
      return 1;
    }
  #endif
  glutDisplayFunc(BulletDemo::display);
  glutReshapeFunc(BulletDemo::reshape);
  glutTimerFunc(30, BulletDemo::timer, 1);
  glutMainLoop();
  BulletDemo::end();
  return 0;
}

